#pragma once

#include "../umlmodel_global.h"

#include <memory>
#include <vector>

#include "MessageEvent.h"

using std::make_shared;
using std::shared_ptr;
using std::vector;

namespace uml {
class Signal;

/// <summary>
/// SignalEvent
/// A SignalEvent represents the receipt of an asynchronous Signal instance.
/// </summary>
class UMLMODEL_EXPORT SignalEvent : public MessageEvent {

public: // Constructors and destructors
    explicit SignalEvent(const QString& umlType="uml::SignalEvent");

public: // JsonSerializable override
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    void toJson(QJsonObject& json) override;

public: // Properties
    /// <summary>
    /// signal getter
    /// The specific Signal that is associated with this SignalEvent.
    /// </summary>
    shared_ptr<Signal> signal() const;

    /// <summary>
    /// signal setter
    /// The specific Signal that is associated with this SignalEvent.
    /// </summary>
    void setSignal(shared_ptr<Signal> value);

private: // Fields
    /// <summary>
    /// signal
    /// The specific Signal that is associated with this SignalEvent.
    /// </summary>
    shared_ptr<Signal> signal_;

};

} // namespace uml
